<template>
  <div class="index" :class="{ 'light-theme': $store.state.theme === 'light' }">
    <!--Hero Section-->
    <div class="hero-section">
      <div class="hero-grid">
        <div class="hero-content">
          <h1 class="hero-title">品質家具<span>-</span>品質生活</h1>
          <h2 class="hero-title">多種風格<span>-</span>夢想家園</h2>
          <p class="hero-description">萬件商品一站購足 滿足所有家具需求</p>
          <button class="shop-now-btn">前往商城</button>
          <img src="~/assets/images/armchair.png" alt="Comfortable armchair" />
        </div>
        <div class="hero-box">
        </div>
      </div>
    </div>
    <div class="content-wrapper">
      <!--商品分類-->
      <div class="category-section">
        <h2 class="section-title">商品分類</h2>
        <div class="category-grid">
          <div class="category-item category-item-large">
            <img src="~/assets/images/b001.png" alt="客廳家具" />
            <div class="category-overlay">
              <button class="category-btn" @click="goToCategory('living')">客廳</button>
            </div>
          </div>
          <div class="category-item">
            <img src="~/assets/images/b002.png" alt="廚房家具" />
            <div class="category-overlay">
              <button class="category-btn" @click="goToCategory('kitchen')">廚房</button>
            </div>
          </div>
          <div class="category-item">
            <img src="~/assets/images/b003.png" alt="臥室家具" />
            <div class="category-overlay">
              <button class="category-btn" @click="goToCategory('bedroom')">臥室</button>
            </div>
          </div>
        </div>
      </div>

      <!--熱門商品橫向輪播-->
      <div class="popular-products-section">
        <div class="container">
          <h2 class="section-title">熱門商品</h2>
          <div class="view-all-container">
            <button class="view-all-btn"
              @click="goToCategory(classifyList.length > 0 ? classifyList[0].id : '')">查看全部</button>
          </div>
        </div>
        <div class="products-scroll">
          <div v-if="classifyList.length > 0 && classifyList[0].productList && classifyList[0].productList.length > 0"
            class="scroll-container">
            <div v-for="(product, index) in classifyList[0].productList.slice(0, 8)" :key="product.id || index"
              class="scroll-item">
              <ProductCard :product="product" @click="goDetail" style="cursor: pointer;" />
            </div>
          </div>
          <div v-else class="loading-container">
            <p>加載中...</p>
          </div>
        </div>
      </div>

      <!--家具展示網格-->
      <div class="furniture-grid-section">
        <h2 class="section-title">精選家具</h2>
        <div class="furniture-grid">
          <div class="grid-image-left">
            <img src="~/assets/images/b003.png" alt="臥室家具" />
          </div>
          <div class="grid-content-left">
            <h3>臥室家具</h3>
            <div class="grid-text">
              <p>年度銷冠床架 萬組家庭見證品質</p>
              <p>北歐風格設計 自然舒適睡眠體驗</p>
              <p>国际认证环保材质 居家健康首选</p>
            </div>
            <button class="grid-btn" @click="goToCategory('bedroom')">立即選購</button>
          </div>
          <div class="grid-content-right">
            <h3>客廳家具</h3>
            <div class="grid-text">
              <p>万件商品一站购足 满足所有家具需求</p>
              <p>从客厅到卧室 完整您的居家配置</p>
              <p>多种风格任您挑选 打造梦想家园</p>
            </div>
            <button class="grid-btn" @click="goToCategory('living')">立即選購</button>
          </div>
          <div class="grid-image-right">
            <img src="~/assets/images/b004.png" alt="客廳家具" />
          </div>

        </div>
      </div>
      <!--分類-->
      <div class="classify">
        <div class="container">
          <div class="list" v-for="(item, index) in classifyList" :key="index">
            <!--推广横幅 - 热销商品-->
            <div class="promotion-banner" v-if="index === 0 && item.big_pic">
              <div class="wrapper_1200">
                <div class="banner-item">
                  <nuxt-link :to="{
                    path: '/goods_cate',
                    query: { cid: item.id, cidIndex: index },
                  }" class="banner-link">
                    <div class="banner-image">
                      <img :src="item.big_pic" />
                    </div>
                    <div class="banner-content">
                      <h3>{{ item.cate_name }}</h3>
                      <div class="banner-text">
                        <p>年度銷冠沙發 萬組家庭見證品質</p>
                        <p>北歐風模塊沙發 自由組合限時特價</p>
                        <p>国际认证环保材质 居家健康首选</p>
                        <p>全馆家具限时特惠 精选品牌滿減</p>
                      </div>
                      <span class="shop-btn">立即選購</span>
                    </div>
                  </nuxt-link>
                </div>
              </div>
            </div>
            <!--推广横幅 - 全部商品-->
            <div class="promotion-banner" v-if="index === 1 && item.big_pic">
              <div class="wrapper_1200">
                <div class="banner-item">
                  <nuxt-link :to="{
                    path: '/goods_cate',
                    query: { cid: item.id, cidIndex: index },
                  }" class="banner-link">
                    <div class="banner-content">
                      <h3>{{ item.cate_name }}</h3>
                      <div class="banner-text">
                        <p>万件商品一站购足 满足所有家具需求</p>
                        <p>从客厅到卧室 完整您的居家配置</p>
                        <p>大小户型都适合 精选空间解决方案</p>
                        <p>多种风格任您挑选 打造梦想家园</p>
                      </div>
                      <span class="shop-btn">立即選購</span>
                    </div>
                    <div class="banner-image">
                      <img :src="item.big_pic" />
                    </div>
                  </nuxt-link>
                </div>
              </div>
            </div>

            <div class="title acea-row">
              <div class="name">{{ item.cate_name }}</div>
              <nuxt-link :to="{
                path: '/goods_cate',
                query: { cid: item.id, cidIndex: index },
              }" class="more">
                更多
              </nuxt-link>
            </div>
            <div class="acea-row">
              <ProductCard v-for="(itemn, indexn) in item.productList" :key="indexn" :product="itemn"
                @click="goDetail" />
            </div>
          </div>
        </div>
        <div class="loadingicon acea-row row-center-wrapper" v-if="classifyList.length && classifyList.length >= limit">
          <span class="loading iconfont icon-jiazai" v-if="!pullRefreshss"></span>{{ title }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import ProductCard from "@/components/ProductCard";

export default {
  name: "index",
  auth: false,
  components: {
    ProductCard
  },
  data() {
    return {
      classifyList: [], //初始數據代碼
      pullRefreshss: true,
      page: 1, //代表页面的初始页数
      limit: 3,
      scollY: null, // 离底部距离有多少
      pageTotal: 0, //總页数
      title: "下拉加載更多",
      siteName: "",
      dragInitialized: false,
    };
  },
  async asyncData({ app }) {
    let indexMsg = await app.$axios.get("/index");
    return {
      siteName: indexMsg.data.site_name,
    };
  },
  fetch({ store }) {
    store.commit("isHeader", true);
    store.commit("isFooter", true);
  },
  head() {
    return {
      title: this.siteName,
    };
  },
  created() {
    this.getClassifyList();
    // this.$store.commit('logo', this.logoUrl);
    // this.$cookies.set('logo',this.logoUrl);
  },
  mounted() {
    this.pullRefresh();
    // 确保页面滚动到顶部
    this.$nextTick(() => {
      window.scrollTo(0, 0);
      document.documentElement.scrollTop = 0;
      document.body.scrollTop = 0;
    });
    // 檢查classifyList數據結構並確保輪播圖初始化
    setTimeout(() => {
      if (this.classifyList.length > 0) {
        console.log('ClassifyList[0]:', this.classifyList[0]);
        console.log('ProductList:', this.classifyList[0].productList);

        // 強制更新視圖，確保swiper正確初始化
        this.$nextTick(() => {
          this.$forceUpdate();
          console.log('Swiper視圖已更新');
          // 避免重複初始化拖動滾動功能
          if (!this.dragInitialized) {
            this.initDragScroll();
            this.dragInitialized = true;
          }

          // 再次強制更新，確保輪播圖顯示
          setTimeout(() => {
            this.$forceUpdate();
            console.log('再次強制更新視圖');
          }, 500);
        });
      }
    }, 1000);
  },
  beforeDestroy() {
    window.onscroll = null;
  },
  methods: {
    getClassifyList() {
      let _this = this,
        currentPage = { page: this.page, limit: this.limit };
      _this.$axios
        .get("/pc/get_category_product", {
          params: currentPage,
        })
        .then(function (res) {
          _this.pageTotal = res.data.count;
          // 请求完成后，把得到的數據拼接到当前dom里面
          _this.classifyList = _this.classifyList.concat(res.data.list);

          // 數據加載完成後，強制更新視圖，確保swiper正確初始化
          _this.$nextTick(() => {
            _this.$forceUpdate();
            console.log('數據加載完成，視圖已更新');
            // 避免重複初始化拖動滾動功能
            if (!_this.dragInitialized) {
              _this.initDragScroll();
              _this.dragInitialized = true;
            }
          });
        })
        .catch(function (err) {
          _this.$message.error(err);
        });
    },

    initDragScroll() {
      // 設置基本滾動行為
      const scrollContainer = document.querySelector('.scroll-container');
      if (!scrollContainer) return;

      // 設置滾動容器樣式
      scrollContainer.style.cursor = 'grab';
      scrollContainer.style.scrollBehavior = 'smooth';

      // 禁用框選文本
      scrollContainer.style.userSelect = 'none';

      // 實現按住拖動滑動
      let isDown = false;
      let startX;
      let scrollLeft;

      scrollContainer.addEventListener('mousedown', (e) => {
        isDown = true;
        scrollContainer.style.cursor = 'grabbing';
        startX = e.pageX - scrollContainer.offsetLeft;
        scrollLeft = scrollContainer.scrollLeft;
        // 防止點擊事件觸發
        e.preventDefault();
      });

      scrollContainer.addEventListener('mouseleave', () => {
        isDown = false;
        scrollContainer.style.cursor = 'grab';
      });

      scrollContainer.addEventListener('mouseup', () => {
        isDown = false;
        scrollContainer.style.cursor = 'grab';
      });

      scrollContainer.addEventListener('mousemove', (e) => {
        if (!isDown) return;
        e.preventDefault();
        const x = e.pageX - scrollContainer.offsetLeft;
        const walk = (x - startX) * 2; // 滾動速度
        scrollContainer.scrollLeft = scrollLeft - walk;
      });
    },


    // 下拉加載ajax
    pullRefresh: function () {
      let _this = this;
      window.onscroll = function () {
        _this.scrollChange();
      };
    },
    scrollChange: function () {
      var _this = this;
      this.scollY =
        this.comsys.getScrollTop() +
        this.comsys.getWindowHeight() -
        this.comsys.getScrollHeight();
      // 把下拉刷新置為false，防止多次请求
      if (this.scollY >= -50) {
        if (this.page > Math.ceil(this.pageTotal / this.limit)) {
          this.title = "已没有更多數據";
          this.pullRefreshss = true;
          return false;
        }
        if (!this.pullRefreshss) {
          return false;
        }
        _this.pullRefreshss = false;
        this.title = "正在加載中....";
        // 加页碼数
        this.page++;
        _this.getClassifyList();
      } else {
        // 其他时候把下拉刷新置為true
        _this.pullRefreshss = true;
        this.title = "下拉加載更多";
      }
    },
    goDetail(item) {
      let path = item.presale
        ? (path = {
          path: "/goods_presell_detail",
          query: {
            id: item.id,
          },
        })
        : (path = { path: `/goods_detail/${item.id}` });
      this.$router.push(path);
    },

    // 跳轉到分類頁面
    goToCategory(category) {
      this.$router.push({
        path: "/goods_cate",
        query: { category: category }
      });
    },
  },
}

</script>

<style scoped lang="scss">
.index {
  transition: background-color 0.3s ease;

  .hero-section {
    width: 100%;
    height: 100vh;
    margin-bottom: 2rem;

    .hero-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      min-height: 100%;

      .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 100px;
        transition: background-color var(--transition), color var(--transition);
        position: relative;

        .hero-title {
          font-family: 'Noto Sans TC', sans-serif;
          font-size: 4rem;
          font-weight: bold;
          line-height: 1.2;
          color: var(--text-white);
          transition: color var(--transition-time);

          span {
            font-size: 5rem;
            color: var(--primary-base);
            margin: 0 20px 10px 20px;
            transition: color var(--transition-time);
          }
        }

        .hero-description {
          font-size: 1.1rem;
          color: var(--text-secondary);
          margin-top: 3rem;
          margin-bottom: 2rem;
          max-width: 400px;
          letter-spacing: 1px;
          transition: color var(--transition-time);
        }

        .shop-now-btn {
          background-color: var(--primary-base);
          color: white;
          border: none;
          padding: 0.75rem 2rem;
          font-weight: bold;
          border-radius: 4px;
          cursor: pointer;
          align-self: flex-start;
          letter-spacing: 1px;
          transition: all 0.3s;

          &:hover {
            background-color: var(--primary-hover);
            transform: translateY(-2px);
          }
        }

        img {
          max-width: 100%;
          max-height: 90%;
          object-fit: contain;
          position: absolute;
          top: 50%;
          right: -17%;
          transform: translateY(-50%);
          z-index: 2;
          opacity: 1;
        }
      }

      .hero-box {
        background-color: var(--primary-base);
        overflow: hidden;
        min-height: 100%;
        width: 100%;
        position: relative;
      }
    }
  }

  .category-section,
  .popular-products-section,
  .furniture-grid-section {
    margin: 60px 0;

    .section-title {
      font-size: 32px;
      font-weight: 500;
      color: var(--dark-text);
      letter-spacing: 1px;
      position: relative;
      transition: color 0.3s ease;

      .light-theme & {
        color: var(--light-text);
      }
    }
  }

  .category-section {
    padding: 100px;

    .section-title {
      margin-bottom: 40px;
    }
  }

  .popular-products-section {
    margin-top: 80px;
    padding-left: 100px;

    .container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .products-scroll {
      position: relative;
      padding: 20px 0;
      min-height: 380px;
      overflow: hidden;

      .scroll-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 24px;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
        padding-top: 5px;
        border-radius: 12px;
        cursor: default;

        /* 隱藏滾動條 */
        &::-webkit-scrollbar {
          height: 0;
          width: 0;
          display: none;
        }

        /* IE 和 Edge */
        -ms-overflow-style: none;
        /* Firefox */
        scrollbar-width: none;
      }

      .scroll-item {
        flex: 0 0 auto;
        width: 400px;
        border-radius: 12px;
      }

      .loading-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 300px;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.8);
        border-radius: 8px;

        p {
          font-size: 18px;
          color: var(--color-primary);
        }
      }
    }

    .view-all-container {
      display: flex;
      justify-content: center;
      margin-right: 100px;

      .view-all-btn {
        background-color: var(--primary-base);
        color: white;
        border: none;
        padding: 8px 20px;
        font-weight: 500;
        border-radius: 4px;
        cursor: pointer;
        letter-spacing: 1px;
        transition: all 0.3s ease;

        &:hover {
          background-color: var(--primary-hover);
          transform: translateY(-2px);
        }
      }
    }
  }

  .category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: 720px;

    .category-item {
      position: relative;
      overflow: hidden;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      cursor: pointer;

      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);

        img {
          transform: scale(1.05);
        }

        .category-overlay {
          background-color: rgba(0, 0, 0, 0.4);
        }
      }

      &.category-item-large {
        grid-row: span 2;
      }

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
      }

      .category-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 30px;
        background-color: rgba(0, 0, 0, 0.3);
        color: white;
        transition: background-color 0.3s ease;

        .category-btn {
          background-color: var(--primary-base);
          color: white;
          border: none;
          padding: 10px 20px;
          border-radius: 4px;
          font-weight: 500;
          letter-spacing: 2px;
          cursor: pointer;
          transition: background-color 0.3s ease, transform 0.3s ease;

          &:hover {
            background-color: var(--primary-hover);
            transform: translateY(-2px);
          }
        }
      }
    }
  }

  .furniture-grid-section {
    padding: 0 100px;
    padding-bottom: 80px;
    margin-bottom: 0;

    .furniture-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 600px 600px;
      margin-top: 40px;

      .grid-content-left,
      .grid-content-right {
        flex: 1;
        padding: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 30px;

        h3 {
          font-size: 3rem;
          font-weight: 700;
          text-align: center;
          color: var(--text-white);
          margin-bottom: 20px;
        }

        .grid-text {
          margin-bottom: 30px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          gap: 15px;

          p {
            font-size: 22px;
            color: #cfcfcf;
            line-height: 1.5;
          }
        }

        .grid-btn {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          padding: 12px 24px;
          background: var(--primary-base);
          color: white;
          margin: 0 auto;
          border: none;
          border-radius: 6px;
          font-size: 16px;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.3s ease;
          align-self: flex-start;

          &:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
          }
        }
      }
    }

    .grid-image-left,
    .grid-image-right {
      flex: 0 0 50%;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
      }
    }

    @media (max-width: 992px) {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto auto;
    }
  }
}

.index.light-theme {
  background-color: var(--bg-white);

  .hero-title {
    color: var(--vip-text) !important;
  }

  .hero-description {
    color: var(--text-tertiary) !important;
  }

  .furniture-grid-section {
    h3 {
      color: var(--vip-text) !important;
    }

    p {
      color: var(--text-primary) !important;
    }

    .grid-btn {
      background-color: var(--primary-base) !important;
      color: #fff !important;
    }
  }

  .section-title {
    color: var(--vip-text);
  }
}

.classify {
  padding: 0 min(160px, 8vw);
  margin-bottom: 40px;
  display: none;

  .container {
    width: 100%;
    margin: 0 auto;
  }

  .list {
    margin-top: 40px;
    border-radius: 16px;
    background: #fff;
    padding: 32px;
    transition: all 0.3s ease;

    .title {
      margin-bottom: 24px;
      padding-bottom: 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .name {
        font-size: 32px;
        color: $text-white;
        font-weight: 700;
        letter-spacing: -0.5px;
      }

      .more {
        width: 44px;
        padding: 8px 16px;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        color: #495057;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 2px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        grid-column: 4;
        margin-left: auto;

        &:hover {
          background: #e9ecef;
          border-color: #adb5bd;
          color: #212529;
          transform: translateY(-1px);
        }

        .iconfont {
          font-size: 12px;
          margin-left: 4px;
        }
      }
    }

    // 推广横幅样式
    .promotion-banner {
      margin-bottom: 80px;

      .wrapper_1200 {
        width: calc(100vw - 320px);
        max-width: none;
        margin: 0 auto;
        padding: 0;

        @media (max-width: 1520px) {
          width: calc(100vw - 160px);
        }

        @media (max-width: 1200px) {
          width: calc(100vw - 80px);
        }

        @media (max-width: 768px) {
          padding: 0 20px;
        }
      }

      .banner-item {
        display: flex;
        align-items: center;
        height: calc((100vw - 320px) * 0.27);
        min-height: 680px;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

        @media (max-width: 1520px) {
          height: calc((100vw - 160px) * 0.27);
        }

        @media (max-width: 1200px) {
          height: calc((100vw - 80px) * 0.27);
        }
      }

      .banner-link {
        display: flex;
        width: 100%;
        height: 100%;
        text-decoration: none;
        color: inherit;

        .banner-image {
          flex: 0 0 60%;
          height: 100%;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }

        .banner-content {
          flex: 1;
          padding: calc(2vw + 48px);
          display: flex;
          flex-direction: column;
          justify-content: space-evenly;

          h3 {
            font-size: calc(1.5vw + 16px);
            font-weight: 700;
            color: $text-white;
            margin-bottom: 40px;
            line-height: 1.2;
          }

          .banner-text {
            margin-bottom: 40px;
            display: flex;
            flex-direction: column;
            gap: 20px;
          }

          p {
            font-size: calc(0.8vw + 8px);
            color: #7f8c8d;
            line-height: 1.5;
          }

          .shop-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: calc(0.6vw + 6px) calc(1.2vw + 12px);
            background: $bg-dark;
            color: white;
            border-radius: calc(0.4vw + 4px);
            font-size: calc(0.8vw + 8px);
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            align-self: flex-start;
            cursor: pointer;
            white-space: nowrap;

            &:hover {
              background: #34495e;
              transform: translateY(-2px);
            }
          }
        }

        @media (max-width: 768px) {
          flex-direction: column;

          .banner-image {
            flex: 0 0 200px;
          }

          .banner-content {
            padding: 24px;

            h3 {
              font-size: 24px;
            }

            p {
              font-size: 14px;
              margin-bottom: 20px;
            }
          }
        }
      }
    }

    // 响应式网格布局
    .acea-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 3rem 1.5rem;
      align-items: start;

      @media (max-width: 1200px) {
        grid-template-columns: repeat(3, 1fr);
      }

      @media (max-width: 900px) {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1rem;
      }

      @media (max-width: 600px) {
        grid-template-columns: 1fr;
        gap: 1.5rem;
      }
    }
  }
}


.scale-up-hor-left {
  -webkit-animation: scale-up-hor-left 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;
  animation: scale-up-hor-left 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

@-webkit-keyframes scale-up-hor-left {
  0% {
    -webkit-transform: scaleX(0.4);
    transform: scaleX(0.4);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
  }

  100% {
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
  }
}

@keyframes scale-up-hor-left {
  0% {
    -webkit-transform: scaleX(0.4);
    transform: scaleX(0.4);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
  }

  100% {
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
  }
}

.pact::-webkit-scrollbar {
  width: 0 !important;
}

/*IE 10+*/

.pact {
  -ms-overflow-style: none;
}

/*Firefox*/

.pact {
  overflow: -moz-scrollbars-none;
}
</style>
